package com.briup.day08.bean;

public class School {
    private String name;
    private int num;
//    private String library;
    //使用静态成员对图书馆属性进行显示初始化
    public static String library="栋梁图书馆";
    public static String getLibrary() {
        //无法使用this
//        System.out.println(num);//静态方法无法访问非静态成员
        return library;
    }
    public School(String name,int num){
        this.name=name;
        this.num=num;
//    this.library=library;
    }
    public void show(){
        System.out.println("学校名称: "+this.name);
        System.out.println("师生数量: "+this.num);
        System.out.println("图书馆: "+School.library);
    }
    public static void main(String[] args) {

    }
}
